package com.profound.notes.main.slice.vm;

import com.profound.notes.main.slice.m.NoteModel;
import com.profound.notes.mvvm.MutableLiveData;
import com.profound.notes.mvvm.ViewModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zjwujlei
 * @date 2021/4/24
 * @email zjwujlei@sina.com
 * @description
 */
public class NoteViewModel extends ViewModel {

    public MutableLiveData<Boolean> isSelected = new MutableLiveData<>(true);
    public MutableLiveData<List<NoteModel>> notes = new MutableLiveData<>(new ArrayList<>());

    /*---- fetch data ----*/

    public void fetchNotes(){
        notes.setValue(NoteModel.fetchNotes());
    }



    /*---- action ----*/

}
